import {request} from '@/libs/js/request.js'

export function oneLogin(data, option = { method: 'POST' }) {
	return request('/eat/api/oneClick/login', data, option);
}

export function getUserInfo(data, option = { method: 'GET' }) {
	return request('/eat/api/user/userInfo', data, option);
}

export function dinnerLogin(data, option = { method: 'POST' }) {
	return request('/api/dinnerlogin', data, option);
}

export function putUserInfo(data, option = { method: 'PUT' }) {
  return request('/eat/api/user', data, option);
}

export function sendSms(data, option = { method: 'GET' }) {
	return request('/eat/api/sendCaptchaSms', data, option);
}

export function smsLogin(data, option = { method: 'POST' }) {
  return request('/eat/api/smslogin', data, option);
}

export function logout() {
	return request('/eat/api/logout', {}, {
		method: 'POST'
	});
}
